************ Chapter 13. MODALITIES OF EUROPEAN DIFFUSION
use data/Demo_book_country_3.dta, clear

************ democracy variables

* polyarchy, 100-point scale
gen v2x_polyarchy_100 = (v2x_polyarchy / .924) * 100

* polyarchy, missing obs imputed
impute v2x_polyarchy lexical_index inc_chall_combined , gen(v2x_polyarchy_imp)
* 100-point scale
replace v2x_polyarchy_imp = v2x_polyarchy_imp * 100
gen v2x_polyarchy_imp_100 = (v2x_polyarchy_imp / 92.4) * 100
replace v2x_polyarchy_imp_100 = . if sovereign_Cojocaru ==.


****** Table_13_1: Colonialism
*** English colony (dummy)

*1) 
qui reg v2x_polyarchy_imp_100 britain predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(britain) replace
qui drop sample
 
*2) 
qui reg v2x_polyarchy_imp_100 britain predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(britain) append
qui drop sample

*** English colonial duration

*3) 
qui reg v2x_polyarchy_imp_100 durbritain_new predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new) append
qui drop sample
 
*4) 
qui reg v2x_polyarchy_imp_100 durbritain_new predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new) append
qui drop sample

*** European colonial duration

*5) 
qui reg v2x_polyarchy_imp_100 duration_global predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(duration_global) append
qui drop sample
 
*6) 
qui reg v2x_polyarchy_imp_100 duration_global predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(duration_global) append
qui drop sample

*** indirect rule
* Lange coding supplemented by Hariri, integrated from Hariri dataset

*7) 
qui reg v2x_polyarchy_imp_100 indirect_rule predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(indirect_rule) append
qui drop sample
 
*8) 
qui reg v2x_polyarchy_imp_100 indirect_rule predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(indirect_rule) append
qui drop sample

*** forced settlement (Owalabi 2015)
* forced_settlement_ext coded 0 for all uncoded cases

*9) 
qui reg v2x_polyarchy_imp_100 forced_settlement_ext predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(forced_settlement_ext) append
qui drop sample
 
*10) 
qui reg v2x_polyarchy_imp_100 forced_settlement_ext predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(forced_settlement_ext) append
qui drop sample

*** horse-race tests - limited to vars with good coverage

*11) british colonialism vars
qui reg v2x_polyarchy_imp_100 britain durbritain_new predallports53_100km lp_lat_abst i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(britain durbritain_new) append
qui drop sample

*12) the rest
qui reg v2x_polyarchy_imp_100 durbritain_new duration_global forced_settlement_ext predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new duration_global forced_settlement_ext) append
qui drop sample

*13)
qui reg v2x_polyarchy_imp_100 durbritain_new duration_global forced_settlement_ext predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def==0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_1.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new duration_global forced_settlement_ext) append
qui drop sample



****** Table_13_2: Religion
*1) Prot + Cath
qui reg v2x_polyarchy_imp_100 chrstprotpct lp_catho80 i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_2.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(chrstprotpct lp_catho80) replace
qui drop sample

*2) + geography
qui reg v2x_polyarchy_imp_100 chrstprotpct lp_catho80 predallports53_100km lp_lat_abst i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_2.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(chrstprotpct lp_catho80) append
qui drop sample

*3) + geography, 100-year lag
qui reg f100.v2x_polyarchy_imp_100 chrstprotpct lp_catho80 predallports53_100km lp_lat_abst i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_2.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(chrstprotpct lp_catho80) append
qui drop sample

*4) + other vars
qui reg v2x_polyarchy_imp_100 chrstprotpct lp_catho80 predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_2.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(chrstprotpct lp_catho80) append
qui drop sample

*5) excluding Europe
qui reg v2x_polyarchy_imp_100 chrstprotpct lp_catho80 predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_2.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(chrstprotpct lp_catho80) append
qui drop sample


****** Table_13_3: Language
*1) bivariate
qui reg v2x_polyarchy_imp_100 eur_lang_pct i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_3.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_lang_pct) replace
qui drop sample

*2) + geography
qui reg v2x_polyarchy_imp_100 eur_lang_pct predallports53_100km lp_lat_abst i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_3.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_lang_pct) append
qui drop sample

*3) + other vars
qui reg v2x_polyarchy_imp_100 eur_lang_pct predallports53_100km lp_lat_abst murdock_dem Muslim i.e_regionpol4 i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_3.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_lang_pct) append
qui drop sample

*4) excluding Europe
qui reg v2x_polyarchy_imp_100 eur_lang_pct predallports53_100km lp_lat_abst murdock_dem Muslim i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_3.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_lang_pct) append
qui drop sample


****** Table_13_4: Intercorrelations
pwcorr durbritain_new duration_global chrstprotpct lp_catho80 eur_lang_pct eur_pct_est_smooth


****** Table_13_5: Horse races
*1)
qui reg v2x_polyarchy_imp_100 durbritain_new duration_global chrstprotpct lp_catho80 eur_lang_pct eur_pct_est_smooth i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new duration_global indirect_rule chrstprotpct lp_catho80 eur_lang_pct eur_pct_est_smooth) replace
qui drop sample

*2)
qui reg v2x_polyarchy_imp_100 durbritain_new duration_global chrstprotpct eur_pct_est_smooth i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new duration_global chrstprotpct eur_pct_est_smooth) append
qui drop sample

*3)
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth i.year , vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample

*4)
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth i.year if year > 1950 & europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample

*5)
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample

*6)
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth predallports53_100km lp_lat_abst Muslim i.e_regionpol4 i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample

*7)
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth predallports53_100km lp_lat_abst Muslim if year == 2000 & europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_5.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample



****** Table_13_6: Pathways from Europe, Predictive Power
*1) british colonialism duration 
qui reg v2x_polyarchy_imp_100 durbritain_new predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, beta
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_6.doc, nocon se bdec(3) stats(beta) keep(durbritain_new) replace
qui drop sample

*2) protestantism 
qui reg v2x_polyarchy_imp_100 chrstprotpct predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, beta
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_6.doc, nocon se bdec(3) stats(beta) keep(chrstprotpct) append
qui drop sample

*3) european ancestry 
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, beta
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_6.doc, nocon se bdec(3) stats(beta) keep(eur_pct_est_smooth) append
qui drop sample

*4) full spec 
qui reg v2x_polyarchy_imp_100 durbritain_new chrstprotpct eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, beta
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_13_6.doc, nocon se bdec(3) stats(beta) keep(durbritain_new chrstprotpct eur_pct_est_smooth) append
qui drop sample
